<%@ page language="C#" autoeventwireup="true" inherits="Member_InvoicesDetail, App_Web_invoicesdetail.aspx.48943a5b" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Tax Invoice</title>
		<LINK href="../Manage/css.css" type="text/css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
.style1 {
	font-size: 20px;
	font-weight: bold;
}
-->
</style>
</head>
<body>
    <form id="form1" runat="server">
  <table width="770" border="0" cellspacing="1" cellpadding="1" align="center" class="NormalText">
    <tr> 
      <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td width="50%"><img src="../images/logo.jpg" width="202" height="78" /></td>
            <td style="line-height:130%" width="50%">Golden Bridge Enterprises 
              (Aust) Pty Ltd<br />
              ABN: 92 112 483 226<br />
              PO BOX 18323, Collins Street East, VIC 8003<br />
              Tel: 1300 137 906<br />
              Fax: 1300 138 916</td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td height="40"><div align="center"> 
          <p align="center" class="style1">Tax Invoice/Statement</p>
        </div></td>
    </tr>
    <tr> 
      <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td><table width="100%"  border="0" cellspacing="1" cellpadding="1">
                <tr> 
                  <td height="22">ABC P/L:<%=sOrgName%></td>
                </tr>
                <tr> 
                  <td height="22">Attn:<%=sContactPerson%></td>
                </tr>
                <tr> 
                  <td height="22">Address: <%=sPostalAddress%></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td><table width="100%"  border="0" cellspacing="1" cellpadding="1">
                <tr> 
                  <td width="50%"><table width="100%"  border="0" cellspacing="1" cellpadding="1">
                      <tr> 
                        <td height="22">Date:<%=sInvoiceDate%></td>
                      </tr>
                      <tr> 
                        <td height="22">No:<%=sInvoiceSid%></td>
                      </tr>
                      <tr> 
                        <td height="22">Ref:<u><%=OrgSid%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u></td>
                      </tr>
                      <tr> 
                        <td height="22">Tax Invoice for period:<u><%=sInvoiceDate%>&nbsp;&nbsp;&nbsp;&nbsp;</u> 
                          to <u><%=sInvoiceToDate%>&nbsp;&nbsp;&nbsp;&nbsp;</u></td>
                      </tr>
                    </table></td>
                  <td width="50%" valign="top"><table width="380"  border="0" cellpadding="1" cellspacing="1" bgcolor="#000000">
                      <tr> 
                        <td height="24" bgcolor="#FFFFFF">Your account summary</td>
                      </tr>
                      <tr> 
                        <td bgcolor="#FFFFFF" style="line-height:150%">Credit 
                          Limit:<%=fCreditLimit.ToString("0.00")%><br />
                          Closing Balance:<%=fClosingBalance.ToString("0.00")%><br />
                          Available Balance:<%=fAvaBalance.ToString("0.00")%></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td><table width="100%"  border="0" cellspacing="1" cellpadding="1">
                <tr> 
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;</td>
                </tr>
                <tr> 
                  <td valign="top"><table width="90%"  border="0" cellspacing="1" cellpadding="1" bgcolor="#000000">
                      <tr> 
                        <td height="22" bgcolor="#FFFFFF">Closing Balance Breakdown</td>
                      </tr>
                      <tr> 
                        <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="1" cellpadding="1">
                            <tr> 
                              <td height="22">Annual %Rate</td>
                              <td>Daily%Rate</td>
                              <td>Balance</td>
                            </tr>
                            <tr> 
                              <td height="22"><u><%=fAnnualRate.ToString("0")%>%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u></td>
                              <td><u><%=fDailyRate.ToString("0.0000")%>%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u></td>
                              <td><u><%=fAvaBalance.ToString("0.00")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u></td>
                            </tr>
                            <tr> 
                              <td height="22">&nbsp;</td>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                          </table></td>
                      </tr>
                    </table></td>
                  <td valign="top"><table width="380"  border="0" cellspacing="1" cellpadding="1" bgcolor="#000000">
                      <tr> 
                        <td height="22" bgcolor="#FFFFFF">Payment Information</td>
                      </tr>
                      <tr> 
                        <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="1" cellpadding="1">
                            <tr> 
                              <td height="22"> Invoice Amount:<%=sInvoiceAmount%></td>
                            </tr>
                            <tr> 
                              <td height="22"> Penalty:<%=fPenalty.ToString("0.00")%> 
                              </td>
                            </tr>
                            <tr> 
                              <td height="22"> Late Interest Charges:<%=fInterestCharges.ToString("0.00")%></td>
                            </tr>
                            <tr> 
                              <td height="22">Total Payable:<%=fTotalDue.ToString("0.00")%></td>
                            </tr>
                            <tr> 
                              <td height="22">Payment Due On:<%=sInvoiceToDate%></td>
                            </tr>
                            <tr> 
                              <td height="22">Payment Method: Direct Debit</td>
                            </tr>
                          </table></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td><br />
              <table width="100%"  border="0" cellspacing="1" cellpadding="1" bgcolor="#000000">
                <tr> 
                  <td height="22" bgcolor="#FFFFFF"><div align="center">Date</div></td>
                  <td bgcolor="#FFFFFF"><div align="center">Our Ref.</div></td>
                  <td bgcolor="#FFFFFF"><div align="center">Employee Name</div></td>
                  <td bgcolor="#FFFFFF"><div align="center">Customer ID</div></td>
                  <td bgcolor="#FFFFFF"><div align="center">Net Pay</div></td>
                  <td bgcolor="#FFFFFF"><div align="center">Finance Cost</div></td>
                  <td bgcolor="#FFFFFF"><div align="center">Amount Charged</div></td>
                </tr>
                <%
            for (int i = 0; i < dtEmpList.Rows.Count; i++)
            {
			    string EmpSid = dtEmpList.Rows[i]["EmpSid"].ToString();
			    string PaymentDate = dtEmpList.Rows[i]["PaymentDate"].ToString();
			    double Amount = Convert.ToDouble(dtEmpList.Rows[i]["Amount"].ToString());
			    string OrgEmpSid = dtEmpList.Rows[i]["OrgEmpSid"].ToString();
			    string EmpName = dtEmpList.Rows[i]["EmpName"].ToString();
				
				//double fAmount = GetEmpAmount(Convert.ToInt32(dtEmpList.Rows[i]["Sid"].ToString()));
                double fFinanceCost = Amount*0.01*fDailyRate*iInvoiceDueDate;
				fS1=Amount+fFinanceCost;
				fSumNetPay+=Amount;
				fSumFinanceCost+=fFinanceCost;
				fSumAmount+=fS1;
            %>
                <tr> 
                  <td height="22" bgcolor="#FFFFFF"><%=PaymentDate%></td>
                  <td bgcolor="#FFFFFF"><%=EmpSid%></td>
                  <td bgcolor="#FFFFFF"><%=EmpName%></td>
                  <td bgcolor="#FFFFFF"><%=OrgEmpSid%></td>
                  <td bgcolor="#FFFFFF"><%=Amount%></td>
                  <td bgcolor="#FFFFFF"><%=fFinanceCost%></td>
                  <td bgcolor="#FFFFFF"><%=fS1%></td>
                </tr>
                <%}%>
                <tr> 
                  <td height="22" bgcolor="#FFFFFF"><div align="center"> Totals 
                    </div></td>
                  <td bgcolor="#FFFFFF"><div align="center"></div></td>
                  <td bgcolor="#FFFFFF"><div align="center"></div></td>
                  <td bgcolor="#FFFFFF"><div align="center"></div></td>
                  <td bgcolor="#FFFFFF"><div align="left"><%=fSumNetPay%></div></td>
                  <td bgcolor="#FFFFFF"><div align="left"><%=fSumFinanceCost.ToString("0.00")%></div></td>
                  <td bgcolor="#FFFFFF"><div align="left"><%=fSumAmount.ToString("0.00")%></div></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td height="30" align="left"><div align="center"> <a href="#" onclick="window.print();">Print</a> 
        </div></td>
    </tr>
  </table>
</form>
</body>
</html>
